const  http=require('http');
const  fs=require('fs');
const  path=require('path');
const  template=require('art-template');

const  server=http.createServer();
server.on("request",(req,res)=>{
    let  url=req.url;
    if(url==="/") {
        var  str=template(path.join(__dirname,"/movie/1.html"),{"name":"123","age":12});
        res.end(str); 
    }
});
server.listen(2000,()=>{
    console.log('server running at http://127.0.0.1:2000') 
})